package day10;

/*
* 字符串的构造
* */
public class Demo3 {
    public static void main(String[] args) {

        String str1 = new String("aaa");

        byte[] bs = {97,98,99,100};

        //将十进制转为二进制在计算机中表示的字符
        String str2 = new String(bs);

        System.out.println(str2);

        int[] ins = {97,98,99,100};

        //同byte数组，参数二:数组第几个元素开始生效,参数三:数组生效几个元素
        String str3 = new String(ins,0,3);

        System.out.println(str3);

        char[] chas = {'a','b','c'};

        String str4 = new String(chas);

        System.out.println(str4);

    }
}
